package com.briup.service.impl;

import com.briup.bean.Book;
import com.briup.dao.BookMapper;
import com.briup.service.IBookService;
import com.briup.util.MyBatisSqlSessionFactory;

import java.util.List;

/**
 * @author 王若龙
 * @CreateTime 2022-09-22 10:58
 */
public class IBookServiceImpl implements IBookService {

    BookMapper bookMapper = MyBatisSqlSessionFactory.openSession(true).getMapper(BookMapper.class);

    @Override
    public List<Book> findAllBooks() {
        return bookMapper.findAllBooks();
    }

    @Override
    public Book findBookById(Integer id) {
        return bookMapper.findBookById(id);
    }
}
